<template>
  <div id="app">
    <!--
    <div v-if="products.length > 0">
      <ul>
        <li v-for="(item, index) in products" :key="index">{{item.title}}</li>
      </ul>
    </div>
    <div v-else>暂无数据</div>
    -->

    <!--
    <template v-if="products.length > 0">
      <ul>
        <li v-for="(item, index) in products" :key="index">{{item.title}}</li>
      </ul>
    </template>
    <template v-else>暂无数据</template>
    -->

    <!--<div v-if="type === 'A'">
      A
    </div>
    <div v-else-if="type === 'B'">
      B
    </div>
    <div v-else-if="type === 'C'">
      C
    </div>
    <div v-else>
      Not A/B/C
    </div>-->

    <!--<div>

    </div>-->
<!--    <div v-for="" v-if="type === 'c'">C</div>-->

  </div>
</template>

<script>

export default {
  name: 'App',
  data() {
    return {
      type: 'C',
      msg: 'hello products!!!',
      products: [
        {
          title: 'apple',
          num: 3
        },
        {
          title: 'huawei',
          num: 13
        },
        {
          title: 'meizu',
          num: 1
        },
        {
          title: 'mi',
          num: 10
        }
      ]
    }
  },
  methods: {}
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
